package com.huawei.bookborrowms.book.controller;

import com.huawei.base.BaseRes;
import com.huawei.bookborrowms.book.dto.BookDto;
import com.huawei.bookborrowms.book.dto.PageDto;
import com.huawei.bookborrowms.book.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 黄后林
 * @date 2022-11-11 14:05:35
 * @note 程序员是用代码喂出来的
 */

@RestController
@RequestMapping("book")
public class BookController {


    @Autowired
    private BookService service;

    //http://localhost:8083/book/find/all
    @PostMapping("find/all")
    public BaseRes findAll(  BookDto dto){
        return service.findAllBooks(dto);
    }
}
